import QtQuick 1.0

Column {
    Row {
        Image {
            id: img0
        }
        Image {
            id: img1
        }
        anchors.horizontalCenter: parent.horizontalCenter
    }
    Row {
        Image {
            id: img2
        }
        Image {
            id: img3
        }
        anchors.horizontalCenter: parent.horizontalCenter
    }

    Component.onCompleted: {
        var resultsArr = baseScreen.wordMaster().guessAt(index).results

        if (resultsArr.length > 0) {
            if (resultsArr[0]) {
                img0.source = "assets/black.png"
            } else {
                img0.source = "assets/white.png"
            }
        } else {
            img0.source = "assets/x.png"
        }

        if (resultsArr.length > 1) {
            if (resultsArr[1]) {
                img1.source = "assets/black.png"
            } else {
                img1.source = "assets/white.png"
            }
        } else {
            img1.source = "assets/x.png"
        }

        if (resultsArr.length > 2) {
            if (resultsArr[2]) {
                img2.source = "assets/black.png"
            } else {
                img2.source = "assets/white.png"
            }
        } else {
            img2.source = "assets/x.png"
        }

        if (resultsArr.length > 3) {
            if (resultsArr[3]) {
                img3.source = "assets/black.png"
            } else {
                img3.source = "assets/white.png"
            }
        } else {
            img3.source = "assets/x.png"
        }
    }
}
